import math

(a,b)=(float(x) for x in input().strip().split())

def fun(x):
    return x-math.sin(x)-1



def fi(x):
    return x-(x-a)*fun(x)/(fun(x)-fun(a))

def secant(x,max_times,error):
    cnt=0
    while 1==1:
        cnt+=1
        new_x = fi(x)
        if math.fabs(new_x-x)<error or cnt==max_times:
            break
        x=new_x
    return new_x,cnt

print("%.4f %d"%secant(b,500,0.0001))


